cmake_minimum_required(VERSION 3.20)
project(project)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

# add_compile_options(-Wall)

file(GLOB SOURCE CONFIGURE_DEPENDS src/*)

set(OpenCV_DIR "/opt/opencv/lib")
find_package(OpenCV REQUIRED)
find_package(Qt5 COMPONENTS
        Core
        Gui
        Widgets
        Sql
        REQUIRED
        )

add_executable(project ${SOURCE})

target_include_directories(project PRIVATE ${CMAKE_SOURCE_DIR}/EasyPR/include)

target_link_libraries(project ${OpenCV_LIBS}
                              Qt5::Core
                              Qt5::Gui
                              Qt5::Widgets
                              Qt5::Sql
                              ${CMAKE_SOURCE_DIR}/EasyPR/lib/libeasypr.so
                              ${CMAKE_SOURCE_DIR}/EasyPR/lib/libthirdparty.a
                            )
